#! python3
#  创建一个简单的密码复制工具

import pyperclip
import string
import random

def generate_password(length=12):
    """生成一个随机密码"""
    characters = string.ascii_letters + string.digits + string.punctuation
    password = ''.join(random.choice(characters) for i in range(length))
    return password

password = generate_password()
print("Generated Password:", password)

# 将生成的密码复制到剪贴板
pyperclip.copy(password)